package tuling.netty.meix;

/**
 * @author RenGaoshuai
 * @date 2023/12/26 13:49
 * @description
 */
public class BasicNameValuePair {
    private  String name;
    private  String value;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public BasicNameValuePair(String name, String value) {
        this.name = name;
        this.value = value;
    }



    public String toString() {
        if (this.value == null) {
            return this.name;
        } else {
            int len = this.name.length() + 1 + this.value.length();
            StringBuilder buffer = new StringBuilder(len);
            buffer.append(this.name);
            buffer.append("=");
            buffer.append(this.value);
            return buffer.toString();
        }
    }
}
